Skip to content

Conversation

@fice-t
Copy link
Contributor

@fice-t fice-t commented Feb 6, 2016

This makes it so that you can't insert new text inside read-only text.

This doesn't feel like the best way of doing it (namely the prompt-specific part), but the other ways that I could think of would need an overhaul of the system or they resulted in surprisingly hard to debug errors, so I just settled on this.

The main reason for this is to prevent people from inserting behind the read-only space at the end of the default prompt and wondering why they can't hit RET to evaluate their input (which happened to me enough times).

This makes it so that you can't insert new text inside read-only text.
@gracjan
Copy link
Contributor

gracjan commented Feb 6, 2016

Is #876 related?

@gracjan
Copy link
Contributor

gracjan commented Feb 6, 2016

Ill merge this tomorrow, unless somebody else chimes in with comments. The sticky parts isn't exactly my area of expertise.

@fice-t
Copy link
Contributor Author

fice-t commented Feb 6, 2016

I don't think so. It affected the spacemacs guys though (#895).

@geraldus
Copy link
Contributor

geraldus commented Feb 7, 2016

One annoying thing related to read-only text in REPL is that if I yank output of invoked command and paste it as input for next command I can't modify it, and removing readonly text property is a headache (I guess there could be some silly solution which I'm not aware of).

@fice-t
Copy link
Contributor Author

fice-t commented Feb 7, 2016

Shouldn't you be able to modify yanked read-only text? I'm able to with these changes.

Also I found this:

yank-excluded-properties is a variable defined in `simple.el'.
Its value is
(category field follow-link fontified font-lock-face help-echo intangible invisible keymap local-map mouse-face read-only yank-handler)


Documentation:
Text properties to discard when yanking.
The value should be a list of text properties to discard or t,
which means to discard all text properties.

which includes the read-only property.

gracjan added a commit that referenced this pull request Feb 10, 2016
Add front-sticky property to read-only text in REPL
@gracjan gracjan merged commit e33d5d8 into haskell:master Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants